package com.shrct.businessprocess.product;

import com.shrct.businessprocess.organization.RCEmployee;
import com.shrct.businessprocess.product.RCCompanyService;
import com.shrct.businessprocess.product.RCCompanyServiceEntry;
import com.shrct.businessprocess.product.RCDerivedFullServiceProductSpecification;
import com.shrct.businessprocess.product.RCFullService;
import com.shrct.businessprocess.product.RCFullServiceProductEntry;
import com.shrct.businessprocess.product.RCIdentifiablePhysicalProductEntry;
import com.shrct.businessprocess.product.RCIdentifiablePhysicalProductEntryDAO;
import com.shrct.businessprocess.product.RCLogicProductEvent;
import com.shrct.businessprocess.product.RCLogicProductStatus;
import com.shrct.businessprocess.product.RCNormalizerService;
import com.shrct.businessprocess.product.RCProductSpecification;
import com.shrct.businessprocess.product.RCRMABorrowReplacementEvent;
import com.shrct.businessprocess.product.RCRMAChildrenReplacementEvent;
import com.shrct.businessprocess.product.RCRMANormalReplacementEvent;
import com.shrct.businessprocess.product.RCServiceInfo;
import com.shrct.businessprocess.product.RCServiceLevel;
import com.shrct.businessprocess.product.RCServiceResponseTime;
import com.shrct.businessprocess.product.impl.RCLogicProductImpl;
import com.shrct.businessprocess.product.proxy.RCLogicProductProxy;
import edu.fudan.langlab.domain.security.User;
import edu.fudan.mylang.pf.EntityImplementation;
import edu.fudan.mylang.pf.IModelObject;
import edu.fudan.mylang.pf.INamedModelObject;
import java.util.Collection;
import java.util.Date;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@EntityImplementation(implementBy = RCLogicProductImpl.class)
public interface RCLogicProduct extends IModelObject, INamedModelObject {
  public abstract String getProjectid();
  
  public abstract RCLogicProduct setProjectid(final String projectid);
  
  public abstract RCIdentifiablePhysicalProductEntry getCurrentProduct();
  
  public abstract RCLogicProduct setCurrentProduct(final RCIdentifiablePhysicalProductEntry currentProduct);
  
  public abstract RCFullServiceProductEntry getCurrentProductService();
  
  public abstract RCLogicProduct setCurrentProductService(final RCFullServiceProductEntry currentProductService);
  
  public abstract RCCompanyServiceEntry getCurrentCompanyService();
  
  public abstract RCLogicProduct setCurrentCompanyService(final RCCompanyServiceEntry currentCompanyService);
  
  public abstract Boolean getRequireService();
  
  public abstract RCLogicProduct setRequireService(final Boolean requireService);
  
  public abstract Collection<RCLogicProductEvent> getTrans();
  
  public abstract RCLogicProduct removeFromTrans(final RCLogicProductEvent rCLogicProductEvent);
  
  public abstract RCLogicProduct removeAllTrans();
  
  public abstract Collection<RCCompanyService> getCompanyServices();
  
  public abstract RCCompanyService createAndAddtoCompanyServices();
  
  public abstract RCCompanyService createAndAddtoCompanyServices(final Procedure1<RCCompanyService> updater);
  
  public abstract RCLogicProduct removeFromCompanyServices(final RCCompanyService rCCompanyService);
  
  public abstract RCLogicProduct removeAllCompanyServices();
  
  public abstract Collection<RCFullService> getFullServices();
  
  public abstract RCFullService createAndAddtoFullServices();
  
  public abstract RCFullService createAndAddtoFullServices(final Procedure1<RCFullService> updater);
  
  public abstract RCLogicProduct removeFromFullServices(final RCFullService rCFullService);
  
  public abstract RCLogicProduct removeAllFullServices();
  
  public abstract RCEmployee getSales();
  
  public abstract RCIdentifiablePhysicalProductEntryDAO getRCIdentifiablePhysicalProductEntryDAO();
  
  public abstract User getSystemUser();
  
  public abstract RCNormalizerService getNormalizerService();
  
  public abstract Collection<RCIdentifiablePhysicalProductEntry> getAllProducts();
  
  /**
   * 更新默认产品服务
   */
  public abstract RCFullServiceProductEntry registerFullServiceProduct(final String _name, final String projectid, final String serviceContraceCode, final RCDerivedFullServiceProductSpecification type, final Date startDate, final Date dueDate);
  
  public abstract RCCompanyServiceEntry registerCompanyService(final String projectid, final String name, final RCServiceInfo serviceInfo, final Date startDate, final Date dueDate);
  
  public abstract RCCompanyServiceEntry registerCompanyService(final String projectid, final String name, final RCServiceLevel serviceLevel, final RCServiceResponseTime serviceResponseTime, final Integer months, final Date startDate, final Date dueDate);
  
  public abstract void unregisterCompanyService(final RCCompanyServiceEntry entry);
  
  public abstract RCRMAChildrenReplacementEvent recordChildrenReplacenebtRMA(final Date date, final String comment, final RCProductSpecification productSpec);
  
  public abstract RCRMABorrowReplacementEvent recordBorrowReplacementRMA(final Date date, final String sid, final RCIdentifiablePhysicalProductEntry fromProduct);
  
  public abstract RCRMANormalReplacementEvent recordNormalRMA(final Date date, final String sid);
  
  public abstract Collection<RCFullServiceProductEntry> getProductServices();
  
  public abstract Collection<RCLogicProductEvent> getEvents();
  
  public abstract String getEntityName();
  
  public abstract RCFullServiceProductEntry getActiveProductService();
  
  public abstract Iterable<RCCompanyServiceEntry> getCompanyServiceEntries();
  
  public abstract RCCompanyServiceEntry getActiveCompanyService();
  
  public abstract void updateProductServiceStatus();
  
  public abstract void updateCompanyServiceStatus();
  
  public abstract RCLogicProductStatus getStatus();
  
  public abstract void start();
  
  public abstract void _registerFullServiceProduct(final RCFullServiceProductEntry serviceProduct);
  
  public abstract void _registerCompanyService(final RCCompanyServiceEntry companyService);
  
  public abstract void _unregisterCompanyService(final RCCompanyServiceEntry companyService);
  
  public abstract void _childrenReplacenebtRMA(final RCRMAChildrenReplacementEvent event);
  
  public abstract void _borrowReplacementRMA(final RCRMABorrowReplacementEvent event);
  
  public abstract void _normalRMA(final RCRMANormalReplacementEvent event);
  
  public abstract Boolean isExisting();
  
  public abstract RCLogicProductProxy toProxy();
}
